Skip to content

fix: add missing expand to update reducer on badge scan edit - #1048

Open
tomrndom wants to merge 2 commits into
masterfrom
fix/edit-badge-scan-refresh
Open

fix: add missing expand to update reducer on badge scan edit#1048
tomrndom wants to merge 2 commits into
masterfrom
fix/edit-badge-scan-refresh

Conversation

@tomrndom

@tomrndom tomrndom commented Aug 21, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/9014802374/86bbj3r74

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes
    • Badge scan updates now retain and return associated extra questions when applicable.
    • Saved notes and extra-question answers remain displayed when reopening a badge scan.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 31e98cf5-5321-4944-8614-ea50fbd607c1

📥 Commits

Reviewing files that changed from the base of the PR and between 785eeda and 5de93bb.

📒 Files selected for processing (2)
  • src/pages/sponsors/__tests__/edit-badge-scan-page.test.js
  • src/reducers/sponsors/__tests__/badge-scan-reducer.test.js

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The badge scan update request now expands extra_questions. Regression tests cover reducer updates and persistence of notes and answers after reopening a badge scan.

Changes

Badge scan update

Layer / File(s) Summary
Request expansion parameters
src/actions/sponsor-actions.js
The update request now includes expand: "extra_questions" alongside the access token.
Badge scan persistence validation
src/reducers/sponsors/__tests__/badge-scan-reducer.test.js, src/pages/sponsors/__tests__/edit-badge-scan-page.test.js
Tests cover expanded and unexpanded extra_questions, preserved entity fields, and updated notes and answers after remounting the page.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 5de93

This change adds the missing expand handling for badge-scan edits and includes focused tests; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding the missing expansion behavior for badge scan updates during editing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/edit-badge-scan-refresh

Comment @coderabbitai help to get the list of available commands.

@smarcet smarcet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomrndom please add missing regression tests

@santipalenque santipalenque left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants